<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="/WEB-INF/view/common/metas.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html >
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>登陆</title>

	<style>
		.page,body{
			background: #fff;
		}
		.biao{
			font-size: 33px;
			font-weight: 700;
			text-align: center;
			margin-top: 150px;
			color: #2c2c2c;
		}
		.shuru{
			background: #e1e1e1;
			padding-left: 8px;
			padding-top: 8px;
			padding-bottom: 8px;
			border-radius: 5px;
			font-size: 16px;
			font-weight: 400;
			color: #2c2c2c;
			width: 96%;
		}
		#form1 .weui-cell:before{
			border-top: none
		}

		.weui-btn{
			width: 98%;
			background: #3a95fb;
			font-weight: 300;
		}
		.weui-btn:active{
			background: #8dc3fe;
		}


	</style>
</head>
<body ontouchstart >
<div class="container" id="container"></div>
<div class="page" style="opacity: 1;">
	<div class="weui-tab">
		<div class="weui-tab__bd-item">
			<p class="biao">销售后台</p>
		</div>
		<!--2表单部分-->
		<div class="weui-tab__bd-item" style="margin-top: 80px">
			<form action="${ctxPath}auth/login" method="post" id="form" >
				<div id="form1">
					<!--.......................................input输入文字.......-->
					<div class="weui-cell" style="border-top: none;background:#e1e1e1;width:94%;border-radius:5px;margin-left: 3%">
						<div class="weui-cell__bd">
							<input class="weui-input shuru" type="text" name="name"  value="" placeholder="请输入邮箱"/>
						</div>
						<div class="weui-cell_ft"></div>
					</div>
					<div class="weui-cell" style="border-top: none;background:#e1e1e1;width:94%;border-radius:5px;margin-left: 3%;margin-top: 20px">
						<div class="weui-cell__bd">
							<input class="weui-input shuru" type="password" name="password" value="" placeholder="请输入密码"/>
						</div>
						<div class="weui-cell_ft"></div>
					</div>
					<div class="js_dialog" id="jinggao3" style="display:none;">
						<div class="weui-mask"></div>
						<div class="weui-dialog">
							<div class="weui-dialog__hd"><strong class="weui-dialog__title">错误提示</strong></div>
							<div class="weui-dialog__bd"><span id="tishi3"></span></div>
							<div class="weui-dialog__ft">
								<a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" id="btn0">知道了</a>
							</div>
						</div>
					</div>
					<div class="weui-btn-area">
						<a class="weui-btn" href="javascript:" id="denglu1">登陆</a>
					</div>
				</div>
			</form>
		</div>
		<!--.....................................................................................     -->
	</div>
</div>
<script>
    var $jg=$("#jinggao3");
    var $ts=$("#tishi3");

    function show_error_msg() {
        var error = "${message_login}";
        if (error != null && error.length != 0){
            $jg.css("display", "block");
            $ts.text(error);
        }
    }
    show_error_msg();




    $("#btn0").on("click", function() {
        $jg.css("display","none");
    })


    //    商户全称
    $("#denglu1").on("click", function() {
        if ($('input[name="username"]').val() == '' || $('textarea[name="username"]').val() == '') {
            $jg.css("display", "block");
            $ts.text("请输入账号");
            return;
        }
        if ($('input[name="password"]').val() == '' || $('textarea[name="password"]').val() == '') {
            $jg.css("display", "block");
            $ts.text("请输入密码");
            return;
        }else{
            document.getElementById("form").submit();
        }
    })

</script>
</body>
</html>
